package com.xueyu.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xueyu.domain.TermBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TermDao extends BaseMapper<TermBean> {
    @Select("SELECT t.*, c.communityName FROM term t LEFT JOIN community c ON t.communityId = c.communityId ${ew.customSqlSegment}")
    List<TermBean> selectLeftJoin(Page<TermBean> page, @Param(Constants.WRAPPER) QueryWrapper<TermBean> queryWrapper);
}
